//
//  MFWDownloadItem.h
//  downloadTest
//
//  Created by 陈曦 on 13-5-6.
//  Copyright (c) 2013年 陈曦. All rights reserved.
//

#import <Foundation/Foundation.h>

//@interface MFWDownloadItem : NSObject
//
//@property (nonatomic, copy)     NSString        *url;       // 下载地址
//@property (nonatomic, copy)     NSString        *savePath;  // 保存路径
//@property (nonatomic, retain)   NSDictionary    *userInfo;  // 用户信息 可以保存唯一key
//
//@end

typedef NS_ENUM(NSInteger, MFWDownloadState) {
    MFWDownloadTaskStateNotInit = 0 , // 初始化后无操作的状态 不应读取到此状态
    MFWDownloadTaskStateStop    = 1 , // 任务停止状态 停止可以转变为运行并且续传
    MFWDownloadTaskStateRunning = 2 ,
    MFWDownloadTaskStateError   = 3 ,
    MFWDownloadTaskStatePause   = 4 ,
    MFWDownloadTaskStateWaiting = 5 ,
    MFWDownloadTaskStateFinished= 6 ,
    MFWDownloadTaskStateCount       // 状态数量 不应读取到此状态 仅仅用于统计
};

@interface MFWDownloadItem : NSObject

@property (nonatomic, copy)   NSString *uuid;
@property (nonatomic, assign) MFWDownloadState state;
@property (nonatomic, copy)   NSString *url;
@property (nonatomic, copy)   NSString *localPath;
@property (nonatomic, copy)   NSString *tempPath;
@property (nonatomic, retain) NSMutableDictionary *userInfo;

@end